<?php defined('SYSPATH') OR die('No direct access allowed.'); ?>

<div class='clearfix' id='main'>
  <div id='content'>
    <div class='deals hproduct  '>
      <div class='deal clearfix'>
        <div class='control_title'>
          <h2 class='fn control_title'> <a href='/deal/show/<?php echo $gym->id;?>'> <?php echo $gym->title;?> </a> </h2>
        </div>
        <div class='merchant_info control clearfix'> </div>
        <div class='primary'>
          <div id='price_tag'>
            <div id='price_tag_inner'>
              <?php 
if ($gym->products[0])
?>
	<div id="amount"> <?php echo '¥'.$gym->products[0]->product_price; ?> </div>;
<?php
?>
              <a href="/deals/buy/order/<?php echo $gym->id;?>" class="button_style_experiment control " id="buy_btn">Buy</a> <a href="/deals/buy?gym_id=<?php echo $gym->id;?>" class="button_style_experiment variant_orange " id="buy_btn">Buy</a> </div>
          </div>
          <div class='clearfix' id='deal_discount'>
            <dl>
              <select id="product_id" name="subscription[product_id]" style="width: 170px; position:relative; left:20px" class="valid">
                <?php 
					foreach ($gym->products as $product)
					{
				?>
					<option value="<?php echo $product->id;?>" > <?php echo $product->product_name; ?> </option>
				<?php
					}
				?>
              </select>
              <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" type="text/javascript"></script>
              <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/jquery-ui.min.js" type="text/javascript"></script>
              <script type="text/javascript">    
					$("#product_id").change(function()
					{
						$.get("/deal/get_product_price/"+$("#product_id").val(),
						  function(data){
							  $("#amount").html("¥"+data);
						  });
						$("#buy_btn").attr("href", "/deals/buy/order/"+$("#product_id").val());
					});
				</script>
            </dl>
          </div>
          <div class='sharing'>
            <p class='share_label'> 分享: </p>
            <div class='share'>
              <ul class="share_links clearfix">
                <li title = "Share with twitter." class="twitter_share"> <a href="http://twitter.com/share?url=http%3A%2F%2Fwww.groupon.com%2Fchicago%2Fdeals%2Findia-house-restaurant-1%3Futm_campaign%3DVisitorReferral%26amp%3Butm_medium%3Dtwitter%26amp%3Butm_source%3Danonymous&amp;text=%2420%20for%20%2440%20Worth%20of%20Indian%20Cuisine%20at%20India%20House%20-%20" class="sprite tw G_event E-Share_Twitter_deal" data-google-analytics-tags=""> Tweet! </a> </li>
                <li title = "Share with email." class = "email_share"> <a href="mailto:?subject=I%20think%20you%20should%20get%20your%20Groupon%3A%20Half%20Off%20Indian%20Cuisine%20at%20India%20House&amp;body=%2420%20for%20%2440%20Worth%20of%20Indian%20Cuisine%20at%20India%20House%20http%3A%2F%2Fwww.groupon.com%2Fchicago%2Fdeals%2Findia-house-restaurant-1%3Futm_campaign%3DVisitorReferral%26amp%3Butm_medium%3Demail%26amp%3Butm_source%3Danonymous" class="sprite email G_event E-Share_Email_deal" data-google-analytics-tags=""> Email! </a> </li>
              </ul>
            </div>
          </div>
        </div>
        <div class='secondary'>
          <div class='photos' id='everyscape'>
            <ul>
              <li><img src="<?php echo url::base();?>images/site_images/<?php echo $city_zone.'/'.$gym->id.'/'.$gym->image;?>" width="440" /></li>
            </ul>
          </div>
        </div>
      </div>
      <div class='write_up' id='write_up'>
        <div class="box box_with_right_col">
          <div class="box_top"></div>
          <div class="box_content">
            <div class="page_content clearfix">
              <div class='article description'>
                <div class='pitch_content'> <?php echo $gym->summary; ?> </div>
              </div>
              <div class='write_up_rail'>
                <div id='company_box'>
                  <h3 class='name'> India House </h3>
                  <ul class='company_links clearfix'>
                    <li><a href="http://www.indiahousechicago.com/" class="G_event E-Company_linkout_Location">Company Website</a></li>
                  </ul>
                  <div class='locations'>
                    <div id='deal_locations_container'>
                      <div class='pointer'></div>
                      <div class='clearfix'>
                        <div class='map_container' id='map_canvas'> </div>
                        <ul>
                          <li class='clearfix last' data-index='A' data-lat='41.8916238' data-lng='-87.6302936' data-marker='marker_A'>
                            <div class='address'>
                              <h4 class='clearfix'>Near North Side</h4>
                              <p> 59 W Grand Ave. <br />
                                Chicago, Illinois 60610 <br />
                                <a href="http://maps.google.com/maps?f=d&amp;daddr=59+W+Grand+Ave.+Chicago+Illinois+60610" class="get_directions">Get Directions</a> </p>
                            </div>
                          </li>
                        </ul>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="box_bottom"></div>
        </div>
      </div>
    </div>
  </div>
  <div id='rail'>
    <div data-admin-panel-path='/deals/india-house-restaurant-1/admin_panel' id='admin_panel_placeholder'></div>
    <ul id='rail_list'>
      <li id='groupon_promise'>
        <div class="box sidebar_white">
          <div class="box_top"></div>
          <div class="box_content clearfix">
            <h3>Our Promise To You</h3>
            <img alt="The Groupon Promise" src="http://assets1.grouponcdn.com/images/groupon/merchants/groupon-promise.png?axl8XglH" />
            <p>Nothing is more important to us than treating our customers well.</p>
            <p>If you ever feel like Groupon let you down, give us a call and we'll return your purchase &ndash; simple as that.</p>
          </div>
          <div class="box_bottom"></div>
        </div>
      </li>
    </ul>
  </div>
</div>

